package com.hxkj.cst.chengshuitong.ui.adapter

import android.content.Context
import android.view.View
import android.widget.ImageView
import com.bigkoo.convenientbanner.holder.Holder

/**
 * 作者：LuoYang
 * 时间：2017/5/31:13:38
 * 邮箱：18981443691@163.com
 * 说明：广告栏适配器
 */
class ConvenientBannerAdapter : Holder<Int> {
    var mImageView: ImageView? = null

    override fun createView(context: Context?): View {
        mImageView = ImageView(context)
        mImageView?.scaleType = ImageView.ScaleType.FIT_XY
        return mImageView as ImageView
    }

    override fun UpdateUI(context: Context?, position: Int, data: Int?) {
        if (data != null)
            mImageView?.setImageResource(data)
    }
}